package com.diy.ibatis.Sqlsession;

import com.diy.ibatis.cfg.Configuration;

/**
 * sqlsessionfactory接口的实现类
 */
public class SqlsessionFactoryimpl implements  SqlSessionFactory{
    private Configuration cfg;
    public SqlsessionFactoryimpl(Configuration cfg){
        this.cfg=cfg;
    }
    /**
     * 用于创建一个新的操作数据库的对象
     * @return
     */
    public SqlSession openSession() {
        return new Sqlsessionimpl(cfg);
    }
}
